<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<script type="text/javascript">
	//substring(开始下标，结束下标) 左闭右开
	let str = '孙悟空摘香蕉'
	console.log(str.substring(1,3))

	//substr('开始下标',’截取的长度)
	console.log(str.substr(0,3))

	//slice() (开始下标，结束下标) 左闭右开
	console.log(str.slice(1,3))

</script>
</body>
</html>